Integrand size = 35, antiderivative size = 314 \[ \int \frac {1}{(a g+b g x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2} \, dx=-\frac {2 b e^{\frac {2 A}{B n}} \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )^{2/n} (c+d x)^2 \operatorname {ExpIntegralEi}\left (-\frac {2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{B n}\right )}{B^2 (b c-a d)^2 g^3 n^2 (a+b x)^2}+\frac {d e^{\frac {A}{B n}} \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )^{\frac {1}{n}} (c+d x) \operatorname {ExpIntegralEi}\left (-\frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{B n}\right )}{B^2 (b c-a d)^2 g^3 n^2 (a+b x)}+\frac {d (c+d x)}{B (b c-a d)^2 g^3 n (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}-\frac {b (c+d x)^2}{B (b c-a d)^2 g^3 n (a+b x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )} \]
[Out]
Time = 0.25 (sec) , antiderivative size = 314, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {2549, 2395, 2343, 2347, 2209} \[ \int \frac {1}{(a g+b g x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2} \, dx=-\frac {2 b e^{\frac {2 A}{B n}} (c+d x)^2 \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )^{2/n} \operatorname {ExpIntegralEi}\left (-\frac {2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{B n}\right )}{B^2 g^3 n^2 (a+b x)^2 (b c-a d)^2}+\frac {d e^{\frac {A}{B n}} (c+d x) \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )^{\frac {1}{n}} \operatorname {ExpIntegralEi}\left (-\frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{B n}\right )}{B^2 g^3 n^2 (a+b x) (b c-a d)^2}-\frac {b (c+d x)^2}{B g^3 n (a+b x)^2 (b c-a d)^2 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}+\frac {d (c+d x)}{B g^3 n (a+b x) (b c-a d)^2 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )} \]
[In]
[Out]
Rule 2209
Rule 2343
Rule 2347
Rule 2395
Rule 2549
Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {b-d x}{x^3 \left (A+B \log \left (e x^n\right )\right )^2} \, dx,x,\frac {a+b x}{c+d x}\right )}{(b c-a d)^2 g^3} \\ & = \frac {\text {Subst}\left (\int \left (\frac {b}{x^3 \left (A+B \log \left (e x^n\right )\right )^2}-\frac {d}{x^2 \left (A+B \log \left (e x^n\right )\right )^2}\right ) \, dx,x,\frac {a+b x}{c+d x}\right )}{(b c-a d)^2 g^3} \\ & = \frac {b \text {Subst}\left (\int \frac {1}{x^3 \left (A+B \log \left (e x^n\right )\right )^2} \, dx,x,\frac {a+b x}{c+d x}\right )}{(b c-a d)^2 g^3}-\frac {d \text {Subst}\left (\int \frac {1}{x^2 \left (A+B \log \left (e x^n\right )\right )^2} \, dx,x,\frac {a+b x}{c+d x}\right )}{(b c-a d)^2 g^3} \\ & = \frac {d (c+d x)}{B (b c-a d)^2 g^3 n (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}-\frac {b (c+d x)^2}{B (b c-a d)^2 g^3 n (a+b x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}-\frac {(2 b) \text {Subst}\left (\int \frac {1}{x^3 \left (A+B \log \left (e x^n\right )\right )} \, dx,x,\frac {a+b x}{c+d x}\right )}{B (b c-a d)^2 g^3 n}+\frac {d \text {Subst}\left (\int \frac {1}{x^2 \left (A+B \log \left (e x^n\right )\right )} \, dx,x,\frac {a+b x}{c+d x}\right )}{B (b c-a d)^2 g^3 n} \\ & = \frac {d (c+d x)}{B (b c-a d)^2 g^3 n (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}-\frac {b (c+d x)^2}{B (b c-a d)^2 g^3 n (a+b x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}+\frac {\left (d \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )^{\frac {1}{n}} (c+d x)\right ) \text {Subst}\left (\int \frac {e^{-\frac {x}{n}}}{A+B x} \, dx,x,\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{B (b c-a d)^2 g^3 n^2 (a+b x)}-\frac {\left (2 b \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )^{2/n} (c+d x)^2\right ) \text {Subst}\left (\int \frac {e^{-\frac {2 x}{n}}}{A+B x} \, dx,x,\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{B (b c-a d)^2 g^3 n^2 (a+b x)^2} \\ & = -\frac {2 b e^{\frac {2 A}{B n}} \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )^{2/n} (c+d x)^2 \text {Ei}\left (-\frac {2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{B n}\right )}{B^2 (b c-a d)^2 g^3 n^2 (a+b x)^2}+\frac {d e^{\frac {A}{B n}} \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )^{\frac {1}{n}} (c+d x) \text {Ei}\left (-\frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{B n}\right )}{B^2 (b c-a d)^2 g^3 n^2 (a+b x)}+\frac {d (c+d x)}{B (b c-a d)^2 g^3 n (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}-\frac {b (c+d x)^2}{B (b c-a d)^2 g^3 n (a+b x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )} \\ \end{align*}
Time = 0.40 (sec) , antiderivative size = 254, normalized size of antiderivative = 0.81 \[ \int \frac {1}{(a g+b g x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2} \, dx=\frac {(c+d x) \left (B (-b c+a d) n-2 b e^{\frac {2 A}{B n}} \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )^{2/n} (c+d x) \operatorname {ExpIntegralEi}\left (-\frac {2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{B n}\right ) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )+d e^{\frac {A}{B n}} (a+b x) \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )^{\frac {1}{n}} \operatorname {ExpIntegralEi}\left (-\frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{B n}\right ) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )\right )}{B^2 (b c-a d)^2 g^3 n^2 (a+b x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )} \]
[In]
[Out]
\[\int \frac {1}{\left (b g x +a g \right )^{3} {\left (A +B \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )\right )}^{2}}d x\]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 755 vs. \(2 (312) = 624\).
Time = 0.29 (sec) , antiderivative size = 755, normalized size of antiderivative = 2.40 \[ \int \frac {1}{(a g+b g x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2} \, dx=-\frac {{\left (B b c d - B a d^{2}\right )} n x - {\left (A b^{2} d x^{2} + 2 \, A a b d x + A a^{2} d + {\left (B b^{2} d x^{2} + 2 \, B a b d x + B a^{2} d\right )} \log \left (e\right ) + {\left (B b^{2} d n x^{2} + 2 \, B a b d n x + B a^{2} d n\right )} \log \left (\frac {b x + a}{d x + c}\right )\right )} e^{\left (\frac {B \log \left (e\right ) + A}{B n}\right )} \operatorname {log\_integral}\left (\frac {{\left (d x + c\right )} e^{\left (-\frac {B \log \left (e\right ) + A}{B n}\right )}}{b x + a}\right ) + 2 \, {\left (A b^{3} x^{2} + 2 \, A a b^{2} x + A a^{2} b + {\left (B b^{3} x^{2} + 2 \, B a b^{2} x + B a^{2} b\right )} \log \left (e\right ) + {\left (B b^{3} n x^{2} + 2 \, B a b^{2} n x + B a^{2} b n\right )} \log \left (\frac {b x + a}{d x + c}\right )\right )} e^{\left (\frac {2 \, {\left (B \log \left (e\right ) + A\right )}}{B n}\right )} \operatorname {log\_integral}\left (\frac {{\left (d^{2} x^{2} + 2 \, c d x + c^{2}\right )} e^{\left (-\frac {2 \, {\left (B \log \left (e\right ) + A\right )}}{B n}\right )}}{b^{2} x^{2} + 2 \, a b x + a^{2}}\right ) + {\left (B b c^{2} - B a c d\right )} n}{{\left (A B^{2} b^{4} c^{2} - 2 \, A B^{2} a b^{3} c d + A B^{2} a^{2} b^{2} d^{2}\right )} g^{3} n^{2} x^{2} + 2 \, {\left (A B^{2} a b^{3} c^{2} - 2 \, A B^{2} a^{2} b^{2} c d + A B^{2} a^{3} b d^{2}\right )} g^{3} n^{2} x + {\left (A B^{2} a^{2} b^{2} c^{2} - 2 \, A B^{2} a^{3} b c d + A B^{2} a^{4} d^{2}\right )} g^{3} n^{2} + {\left ({\left (B^{3} b^{4} c^{2} - 2 \, B^{3} a b^{3} c d + B^{3} a^{2} b^{2} d^{2}\right )} g^{3} n^{2} x^{2} + 2 \, {\left (B^{3} a b^{3} c^{2} - 2 \, B^{3} a^{2} b^{2} c d + B^{3} a^{3} b d^{2}\right )} g^{3} n^{2} x + {\left (B^{3} a^{2} b^{2} c^{2} - 2 \, B^{3} a^{3} b c d + B^{3} a^{4} d^{2}\right )} g^{3} n^{2}\right )} \log \left (e\right ) + {\left ({\left (B^{3} b^{4} c^{2} - 2 \, B^{3} a b^{3} c d + B^{3} a^{2} b^{2} d^{2}\right )} g^{3} n^{3} x^{2} + 2 \, {\left (B^{3} a b^{3} c^{2} - 2 \, B^{3} a^{2} b^{2} c d + B^{3} a^{3} b d^{2}\right )} g^{3} n^{3} x + {\left (B^{3} a^{2} b^{2} c^{2} - 2 \, B^{3} a^{3} b c d + B^{3} a^{4} d^{2}\right )} g^{3} n^{3}\right )} \log \left (\frac {b x + a}{d x + c}\right )} \]
[In]
[Out]
Timed out. \[ \int \frac {1}{(a g+b g x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2} \, dx=\text {Timed out} \]
[In]
[Out]
\[ \int \frac {1}{(a g+b g x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2} \, dx=\int { \frac {1}{{\left (b g x + a g\right )}^{3} {\left (B \log \left (e \left (\frac {b x + a}{d x + c}\right )^{n}\right ) + A\right )}^{2}} \,d x } \]
[In]
[Out]
\[ \int \frac {1}{(a g+b g x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2} \, dx=\int { \frac {1}{{\left (b g x + a g\right )}^{3} {\left (B \log \left (e \left (\frac {b x + a}{d x + c}\right )^{n}\right ) + A\right )}^{2}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {1}{(a g+b g x)^3 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2} \, dx=\int \frac {1}{{\left (a\,g+b\,g\,x\right )}^3\,{\left (A+B\,\ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )\right )}^2} \,d x \]
[In]
[Out]